package day01;

public class Xiancheng2 {

	public static void main(String[] args) {
		Thread t =new Thread(new M3());
		Thread t1 =new Thread(new M4());
		t.start();
		t1.start();
		System.out.println("是个弟弟");
	}
}
//方式二：实现Runnanle接口，重写run方法
class M3 implements Runnable{	
	public void run() {
		for(int i=0;i<10;i++) {
			System.out.println("弟弟");
		}	
		System.out.println("臭弟弟");
	}	
}
class M4 implements Runnable{	
	public void run() {
		for(int i=0;i<10;i++) {
			System.out.println("哥哥");
		}		
	}	
}
